﻿using UnityEngine;
using System.Collections;

public class CharacterMovement : MonoBehaviour 
{
	public float speed = 1;
	
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Input.GetKey(KeyCode.W))
		{
			transform.Translate(0f,0f,speed*Time.deltaTime);
		}
		else if(Input.GetKey(KeyCode.S))
		{
			transform.Translate(0f,0f,-1*speed*Time.deltaTime);
		}
		if(Input.GetKey(KeyCode.A))
		{
			transform.Translate(-1*speed*Time.deltaTime,0f,0f);
		}
		else if(Input.GetKey(KeyCode.D))
		{
			transform.Translate(speed*Time.deltaTime,0f,0f);
		}
	}
}
